<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page with Loading Transition</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body, html {
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            font-family: Arial, sans-serif;
        }
        #loader {
            position: fixed;
            width: 100%;
            height: 100%;
            background-color: #fff;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }
        #loader .spinner-border {
            width: 3rem;
            height: 3rem;
        }
        .loaded #loader {
            opacity: 0;
            transition: opacity 0.5s ease-out;
        }
        .loaded #loader {
            display: none;
        }
    </style>
</head>
<body>
<div id="loader">
    <div class="spinner-border text-primary" role="status">
        <span class="visually-hidden">Loading...</span>
    </div>
</div>

<div id="content" style="display: none;">
    <div class="container">
        <h1>Welcome to My Website</h1>
        <p>This is the content of the page, which becomes visible after the loading animation.</p>
        <!-- Your other content goes here -->
    </div>
</div>

<script>
    document.addEventListener("DOMContentLoaded", function() {
        // Simulate loading time, replace this with a real load event
        setTimeout(function() {
            document.body.classList.add('loaded');
            document.getElementById('content').style.display = 'block';
        }, 2000); // 2 seconds
    });
</script>
</body>
</html>
